package com.onLineCar.dispatch.entity.utils;

import org.springframework.data.geo.Point;

public class PointConvertStringUtil {
    public static String convertPointToString(Point point) {
        return point.getX() + "," + point.getY();
    }

    public static Point convertStringToPoint(String pointString) {
        String[] pointArray = pointString.split(",");
        return new Point(Double.parseDouble(pointArray[0]), Double.parseDouble(pointArray[1]));
    }
}
